<!--  -->
<script setup>
import { render } from './bookRender'
import Episode from './components/Episode.vue'
import Operation from './components/Operation.vue'
import data from './mock.json'

</script>

<template>
  <div class="view-container">
    <div class="episode-area">
      <Episode></Episode>
    </div>
    <div class="read-area">
      <div class="main-header">
        <div class="main-title">示例大标题</div>
        <div class="main-subtitle">小标题</div>
      </div>
      <div class="content" v-html="render(data.content)"> </div>
    </div>
    <div class="op-area">
      <Operation></Operation>
    </div>
  </div>
</template>

<style>
@import './style.scss';
</style>

<style scoped lang="scss">
.view-container {
  width: 100%;
  flex: 1;
  display: grid;
  grid-template-columns: 20% 60% 20%;
}

.episode-area {
  position: sticky;
  top: 0;
  margin-right: 2rem;
  min-width: 250px;
  background-color: var(--card-left-side-bgc);
  box-shadow: 0px 2px 6px rgba(60, 83, 54, 0.67);
  border: 1px solid var(--border-secondary);

  @media screen and (max-width: 882px) {
    display: none;
  }
}

.read-area {
  margin-top: 5px;
  background: linear-gradient(180deg, #e2ebdf 0%, #ddecd7 100%);
  box-shadow: 0px 2px 6px rgba(54, 54, 54, 0.5);
  border: 1px solid var(--border-secondary);
}

.op-area {
  position: sticky;
  top: 0;
  margin-left: 1rem;
  background-color: var(--card-right-side-bgc);
  box-shadow: 0px 2px 6px rgba(54, 54, 54, 0.5);
  border: 1px solid var(--border-secondary);

  @media screen and (max-width: 992px) {
    display: none;
  }
}

.main-header {
  margin: 10px 0;
  padding-bottom: 10px;

  .main-title {
    padding-top: 10px;
    padding-bottom: 0px;
    font-family: "Oswald", "Bookman Old Style", serif;
    font-size: 2.50rem;
    border-bottom: 1px solid var(--site-home-title);
    letter-spacing: 0.12rem;
    width: max-content;
    margin: auto;
    color: var(--site-home-title);
  }

  .main-subtitle {
    font-family: Roboto, inherit "Merienda", sans-serif;
    font-weight: 400;
    font-size: .75rem;
    color: var(--site-home-subtitle);
    letter-spacing: 0.100rem;
    margin: auto;
    width: max-content;
  }

}
</style>
